I updated the vcpu_to_cpu string creation to include a field separator,
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Wed, 6 Jul 2005 22:23:18 +0000 (22:23 +0000)
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Wed, 6 Jul 2005 22:23:18 +0000 (22:23 +0000)
commit8e1bda2932fad85e413ed300cba46274eb680988
tree247196925a44db04f1e3d13477e47542b83d9fef
parent108420db45e5f65ddd8a0d226e9f913d7c3ed590
I updated the vcpu_to_cpu string creation to include a field separator,
which gets rid of the -1 -> # hack and works for cpus > 9.

I ran into some issues with stale vcpu_to_cpu lists when running the
hotplug subprogram.  I would take a vcpu offline, and then issue the
command to bring it back and the vcpu_to_cpu list would not have changed
to indicate the the vcpu actually went down.  If I injected a xm list -v
(which always showed the correct mapping) then subsequent hotplug
commands would see the state change and fire off the hotplug request.  I
don't know that not sending the event when not changing state saves that
much work so I took the state check out and now just send the hotplug
event directly.

> Also the whole hotplug stuff is still missing interrupt re-routing
> when a vcpu is taken down.  To do this, we need an evtchn operation to
> change the vcpu affinity of a port by changing notify_vcpu_id.

I don't fully understand all of the mappings that are happening, so this
part of the patch might be way off.  In any case, I've added a new
evtchn op to set the notify_vcpu_id field of a channel.  I updated the
HOTPLUG_CPU code to use the new routines when bringing cpus up and down.
When taking down a cpu, I route the IPI irq channels to CPU 0, and when
the cpu comes up, it re-routes the channels back to the awakened CPU.

From: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: ian@xensource.com
linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c
linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xm/main.py
xen/common/event_channel.c
xen/include/public/event_channel.h